#include "LDCGameObjectManager.h"

void LDCGameObjectManager::addGameObject(LDCGameObject* _object)
{
	mObjectList.push_back(_object);
	if(_object->isVisible())
	{
		mVisibleList.push_back((Visible*)_object);
	}
}

void LDCGameObjectManager::update(float deltaTime)
{
	vector<LDCGameObject*>::iterator it = mObjectList.begin();
	for(;it != mObjectList.end();it++)
	{
		(*it)->update(deltaTime);
	}
}

void LDCGameObjectManager::render()
{
	vector<Visible*>::iterator it = mVisibleList.begin();
	for(;it != mVisibleList.end(); it++)
	{
		(*it)->render();
	}
}